# 测试只支持Playwright（因为优先调用本地安装的chrome。Selenium显示不支持chrome版本131）
# https://pywebview.idepy.com/examples/remote_debugging.html
import webview

webview.settings['REMOTE_DEBUGGING_PORT'] = 9222
window = webview.create_window('Wow 伙伴！', 'https://tool.ip138.com/useragent/', min_size=(400, 300), on_top=True)
webview.settings['REMOTE_DEBUGGING_PORT'] = 9222
webview.settings['OPEN_DEVTOOLS_IN_DEBUG'] = True
webview.settings["OPEN_EXTERNAL_LINKS_IN_BROWSER"] = True
webview.start(debug=True)
